package com.lin.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.Objects;

@Data
@AllArgsConstructor
@NoArgsConstructor
/*产品档案*/
public class DFile {

    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    private String productId;

    private String productName;

    private String factoryName;

    private String firstKindId;

    private String firstKindName;

    private String secondKindId;

    private String secondKindName;

    private String thirdKindId;

    private String thirdKindName;

    private String productNick;

    private String type;

    private String productClass;

    private String personalUnit;

    private String personalValue;

    private String providerGroup;

    private String warranty;

    private String twinName;

    private String twinId;

    private String lifecycle;

    private Double listPrice;

    private Double costPrice;

    private Double realCostPrice;

    private String amountUnit;

    private String productDescribe;

    private String responsiblePerson;

    private String register;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date registerTime;

    private String checker;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date checkTime;

    private String checkTag;

    private String changer;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date changeTime;

    private String changeTag;

    private String priceChangeTag;

    private Integer fileChangeAmount;

    private String deleteTag;

    private String designModuleTag;

    private String designProcedureTag;

    private String designCellTag;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DFile dFile = (DFile) o;
        return Objects.equals(id, dFile.id) &&
                Objects.equals(productId, dFile.productId) &&
                Objects.equals(productName, dFile.productName) &&
                Objects.equals(factoryName, dFile.factoryName) &&
                Objects.equals(firstKindId, dFile.firstKindId) &&
                Objects.equals(firstKindName, dFile.firstKindName) &&
                Objects.equals(secondKindId, dFile.secondKindId) &&
                Objects.equals(secondKindName, dFile.secondKindName) &&
                Objects.equals(thirdKindId, dFile.thirdKindId) &&
                Objects.equals(thirdKindName, dFile.thirdKindName) &&
                Objects.equals(productNick, dFile.productNick) &&
                Objects.equals(type, dFile.type) &&
                Objects.equals(productClass, dFile.productClass) &&
                Objects.equals(personalUnit, dFile.personalUnit) &&
                Objects.equals(personalValue, dFile.personalValue) &&
                Objects.equals(providerGroup, dFile.providerGroup) &&
                Objects.equals(warranty, dFile.warranty) &&
                Objects.equals(twinName, dFile.twinName) &&
                Objects.equals(twinId, dFile.twinId) &&
                Objects.equals(lifecycle, dFile.lifecycle) &&
                Objects.equals(listPrice, dFile.listPrice) &&
                Objects.equals(costPrice, dFile.costPrice) &&
                Objects.equals(realCostPrice, dFile.realCostPrice) &&
                Objects.equals(amountUnit, dFile.amountUnit) &&
                Objects.equals(productDescribe, dFile.productDescribe) &&
                Objects.equals(responsiblePerson, dFile.responsiblePerson) &&
                Objects.equals(register, dFile.register) &&
                Objects.equals(registerTime, dFile.registerTime) &&
                Objects.equals(checker, dFile.checker) &&
                Objects.equals(checkTime, dFile.checkTime) &&
                Objects.equals(checkTag, dFile.checkTag) &&
                Objects.equals(changer, dFile.changer) &&
                Objects.equals(changeTime, dFile.changeTime) &&
                Objects.equals(changeTag, dFile.changeTag) &&
                Objects.equals(priceChangeTag, dFile.priceChangeTag) &&
                Objects.equals(fileChangeAmount, dFile.fileChangeAmount) &&
                Objects.equals(deleteTag, dFile.deleteTag) &&
                Objects.equals(designModuleTag, dFile.designModuleTag) &&
                Objects.equals(designProcedureTag, dFile.designProcedureTag) &&
                Objects.equals(designCellTag, dFile.designCellTag);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, productId, productName, factoryName, firstKindId, firstKindName, secondKindId, secondKindName, thirdKindId, thirdKindName, productNick, type, productClass, personalUnit, personalValue, providerGroup, warranty, twinName, twinId, lifecycle, listPrice, costPrice, realCostPrice, amountUnit, productDescribe, responsiblePerson, register, registerTime, checker, checkTime, checkTag, changer, changeTime, changeTag, priceChangeTag, fileChangeAmount, deleteTag, designModuleTag, designProcedureTag, designCellTag);
    }
}